import request from '@/utils/request'

// 查询房间消费账单列表
export function listConsumptionAll(query) {
  return request({
    url: '/system/consumption/all',
    method: 'get',
    params: query
  })
}

// 查询房间消费账单列表
export function listConsumption(query) {
  return request({
    url: '/system/consumption/list',
    method: 'get',
    params: query
  })
}

// 查询房间消费账单详细
export function getConsumption(consumptionId) {
  return request({
    url: '/system/consumption/' + consumptionId,
    method: 'get'
  })
}

// 新增房间消费账单
export function addConsumption(data) {
  return request({
    url: '/system/consumption',
    method: 'post',
    data: data
  })
}

// 修改房间消费账单
export function updateConsumption(data) {
  return request({
    url: '/system/consumption',
    method: 'put',
    data: data
  })
}

// 删除房间消费账单
export function delConsumption(consumptionId) {
  return request({
    url: '/system/consumption/' + consumptionId,
    method: 'delete'
  })
}
